b4cd5212b2728c2bcfd17d783975a0d6de3e872d,src/shogun2-core/src/main/java/de/terrestris/shogun2/service/AbstractSecuredPersistentObjectService.java,AbstractSecuredPersistentObjectService,addGroupPermissions,#E#UserGroup#Permission#,148

Before Change


					persistEntity = true;
				} else {
					// add the passed permissions to the the existing permission collection
					groupPermissionCollection.getPermissions().addAll(permissionsSet);
					LOG.debug("Added the following permissions to an existing permission collection: "
							+ permissionsSet);
				}

After Change


					persistPermissionCollection = true;
					persistEntity = true;
				} else {
					Set<Permission> groupPermissions = groupPermissionCollection.getPermissions();
					int originalNrOfPermissions = groupPermissions.size();

					// add the passed permissions to the the existing permission collection
					groupPermissions.addAll(permissionsSet);

					int newNrOfPermissions = groupPermissions.size();

					if(newNrOfPermissions > originalNrOfPermissions) {
						// persist the collection as we have "really" added new permission(s)
						persistPermissionCollection = true;
						LOG.debug("Added the following permissions to an existing permission collection: "